package com.easyder.wrapper.widget;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;

import com.easyder.wrapper.R;
import com.easyder.wrapper.base.adapter.ViewHelper;
import com.easyder.wrapper.base.view.WrapperDialog;

import me.winds.widget.autolayout.utils.AutoUtils;

/**
 * Auther:  winds
 * Data:    2018/5/3
 * Version: 1.0
 * Desc:
 */


public class LoadingDailog extends WrapperDialog {

    public LoadingDailog(Context context) {
        super(context);
    }

    @Override
    public int getLayoutRes() {
        return R.layout.dialog_loading;
    }

    @Override
    protected void setDialogParams(Dialog dialog) {
        setDialogParams(dialog, Gravity.CENTER);
        dialog.setCanceledOnTouchOutside(false);
    }

    @Override
    public void help(ViewHelper helper) {
        helper.setBackgroundDrawable(R.id.loading_view, new ColorDrawable(Color.parseColor("#FFFFFF")).setRoundCorner(AutoUtils.getPercentWidthSize(12), AutoUtils.getPercentWidthSize(12)));
    }
}
